Skip to content

Support concise options#13

Merged
metafates merged 3 commits into
mainfrom
concise-options
May 21, 2026
Merged

Support concise options#13
metafates merged 3 commits into
mainfrom
concise-options

Conversation

@metafates
Copy link
Copy Markdown
Member

This PR adds support for concise (init-less) testo.Options calls:

var _ = testo.Options(
    myplugin.WithFoo(),
    myplugin.WithBar(),
)

as opposed to

func init() {
    testo.Options(
        myplugin.WithFoo(),
        myplugin.WithBar(),
    )
}

This is implemented by returning an empty struct{} from Options func, similar to For function.

@metafates metafates self-assigned this May 21, 2026
@metafates metafates marked this pull request as ready for review May 21, 2026 20:49
@metafates metafates merged commit ff33a04 into main May 21, 2026
5 checks passed
@metafates metafates deleted the concise-options branch May 21, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant